<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.dao.CommonDAO"%>
<%@page import="com.util.Info"%>
<%@page import="com.util.PageManager"%>
<%@page import="com.model.Tjreport"%>
<%@page import="com.model.Familycy"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>可穿戴健康监测系统</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<LINK rel="shortcut icon" type=image/x-icon href="/images/favicon.ico">
<LINK title=ITeye rel=search type=application/opensearchdescription+xml href="/open_search.xml">
<LINK title="" rel=alternate type=application/rss+xml href="/rss">
<LINK rel=stylesheet type=text/css href="frontfiles/blog.css" media=screen>
<LINK rel=stylesheet type=text/css href="frontfiles/blue.css" media=screen>
<SCRIPT type=text/javascript src="frontfiles/application.js"></SCRIPT>

<SCRIPT type=text/javascript>

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-535605-1']);
  _gaq.push(['_setDomainName', 'iteye.com']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</SCRIPT>
  </head>
  
  <BODY>
  <%CommonDAO dao = (CommonDAO)Info.getDao(request,"CommonDAO");  %>


<jsp:include page="top.jsp"></jsp:include>


<DIV id=content class=clearfix>
<DIV id=main>
<DIV class=blog_main_title> <SPAN>体检报告</SPAN> 
<DIV id=fd></DIV></DIV>

<DIV class=blog_main>
<DIV class=blog_title>
<%   Familycy cy = (Familycy)session.getAttribute("cy");  %>
	<table width="100%" cellpadding="1" cellspacing="1" border="0">
		<tr>
			<td valign="top" width="30%">
					<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#BBD3EB" style="font-size:12px">
						<tr>
                          <td height="27" align="center" background="/wearablehealthymonitorsys/admin/images/index1_72.gif" bgcolor="#FFFFFF">报告编号</td>
                          <td height="27" align="center" background="/wearablehealthymonitorsys/admin/images/index1_72.gif" bgcolor="#FFFFFF">体检日期</td>
                            </tr>
					<%String cyid = request.getParameter("cyid");
					String bgno = request.getParameter("bgno")==null?"":request.getParameter("bgno");
					String did = request.getParameter("did")==null?"":request.getParameter("did");
					if(!did.equals("")){
						dao.delete(did,"Tjreport");
					}
					ArrayList<Tjreport> tjbglist = (ArrayList<Tjreport>)dao.findByHql("from Tjreport where cyid='"+cy.getId()+"' order by savetime desc");
					for(Tjreport tjbg:tjbglist){
					%>
                          <tr>
                            <td height="26" align="center" bgcolor="#FFFFFF"><a href="tjbg.jsp?bgno=<%=tjbg.getBgno() %>&cyid=<%=cy.getId() %>"><%=tjbg.getBgno() %></a></td>
                            <td height="26" align="center" bgcolor="#FFFFFF"><%=tjbg.getSavetime().substring(0,10) %></td>
                          </tr>
                        <%} %> 
					</table> 
			</td>
			<td valign="top" width="70%">
					<%
						if(!bgno.equals("")){
						Tjreport bg = (Tjreport)dao.findByHql("from Tjreport where bgno='"+bgno+"'").get(0);
						%>
						<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#BBD3EB" style="font-size:12px">   
						<th colspan="4" height="27" align="center" background="/wearablehealthymonitorsys/admin/images/index1_72.gif" bgcolor="#FFFFFF">体检报告</th>
						<tr height="27">
							<td align="center" bgcolor="#FFFFFF">姓名</td>
							<td align="center" bgcolor="#FFFFFF"><%=cy.getTname() %></td>
							<td align="center" bgcolor="#FFFFFF">性别</td>
							<td align="center" bgcolor="#FFFFFF"><%=cy.getSex() %></td>
						</tr>
						<tr height="27">
							<td align="center" bgcolor="#FFFFFF">年龄</td>
							<td align="center" bgcolor="#FFFFFF"><%=bg.getAge() %></td>
							<td align="center" bgcolor="#FFFFFF">身高</td>
							<td align="center" bgcolor="#FFFFFF"><%=bg.getSg() %></td>
						</tr>
						<tr height="27">
							<td align="center" bgcolor="#FFFFFF">体重</td>
							<td align="center" bgcolor="#FFFFFF"><%=bg.getTz() %><%if(Double.valueOf(bg.getTz())>=90){ %><font color="red">[过重]</font> <%} %></td>
							<td align="center" bgcolor="#FFFFFF">视力</td>
							<td align="center" bgcolor="#FFFFFF"><%=bg.getSl() %><%if(Double.valueOf(bg.getSl())<0.8){ %><font color="red">[注重用眼]</font><%} %></td>
						</tr>
						<tr height="27">
							<td align="center" bgcolor="#FFFFFF">听力</td>
							<td align="center" bgcolor="#FFFFFF"><%=bg.getTl() %></td>
							<td align="center" bgcolor="#FFFFFF">血压</td>
							<td align="center" bgcolor="#FFFFFF"><%=bg.getXy() %></td>
						</tr>
						<tr height="27">
							<td align="center" bgcolor="#FFFFFF">呼吸系统是否正常</td>
							<td align="center" bgcolor="#FFFFFF"><%=bg.getHxnote() %></td>
							<td align="center" bgcolor="#FFFFFF">有无先天异常病</td>
							<td align="center" bgcolor="#FFFFFF"><%=bg.getYcbnote() %></td>
						</tr>
						<tr height="27">
							<td align="center" bgcolor="#FFFFFF">消化系统是否正常</td>
							<td align="center" bgcolor="#FFFFFF"><%=bg.getXhxtnote() %></td>
							<td align="center" bgcolor="#FFFFFF">是否贫血</td>
							<td align="center" bgcolor="#FFFFFF"><%=bg.getIspx() %></td>
						</tr>
						<tr>
							<td align="center" bgcolor="#FFFFFF">其他</td>
							<td bgcolor="#FFFFFF" colspan="3"><%=bg.getOthernote() %></td>
						</tr>
						 </table>
						 <%} %>
			</td>
		</tr>
		
	</table>


</DIV>
</DIV>

  <div align="center">${page.info }</div>
</DIV>
<jsp:include page="indexleft.jsp"></jsp:include>

</DIV>


<jsp:include page="foot.jsp"></jsp:include>


<SCRIPT type=text/javascript>
  document.write("<img src='http://stat.iteye.com/?url="+ encodeURIComponent(document.location.href) + "&referrer=" + encodeURIComponent(document.referrer) + "&user_id=' width='0' height='0' />");
</SCRIPT>
<script type="text/javascript">
<%
		String suc = (String)request.getAttribute("suc");
		if(suc!=null){%>
		 alert("登陆成功");
		 parent.location.replace("/wearablehealthymonitorsys/index.jsp");
		 <%}%>
		<%
		String no = (String)request.getAttribute("no");
		if(no!=null){%>
		 alert("用户名或密码错误");
		 parent.location.replace("/wearablehealthymonitorsys/login.jsp");
		 <%}%>
</script>
</BODY></HTML>
